package com.san.hkhospital.service.impl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

import com.san.hkhospital.mapper.PayinMapper;
import com.san.hkhospital.entity.Payin;
import com.san.hkhospital.entity.PayinExample;
import com.san.hkhospital.service.PayinService;
import org.springframework.transaction.annotation.Transactional;

/**
 * ClassName:PayinServiceImpl
 * PackageName:com.san.hkhospital.service.impl
 * Description:
 *
 * @Author:yy
 * @CreatedAt:2024/11/13 14:38
 * 
 */

@Transactional
@Service
public class PayinServiceImpl implements PayinService{

    @Resource
    private PayinMapper payinMapper;

    @Override
    public long countByExample(PayinExample example) {
        return payinMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(PayinExample example) {
        return payinMapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Integer inId) {
        return payinMapper.deleteByPrimaryKey(inId);
    }

    @Override
    public int insert(Payin record) {
        return payinMapper.insert(record);
    }

    @Override
    public int insertSelective(Payin record) {
        return payinMapper.insertSelective(record);
    }

    @Override
    public List<Payin> selectByExample(PayinExample example) {
        return payinMapper.selectByExample(example);
    }

    @Override
    public Payin selectByPrimaryKey(Integer inId) {
        return payinMapper.selectByPrimaryKey(inId);
    }

    @Override
    public int updateByExampleSelective(Payin record,PayinExample example) {
        return payinMapper.updateByExampleSelective(record,example);
    }

    @Override
    public int updateByExample(Payin record,PayinExample example) {
        return payinMapper.updateByExample(record,example);
    }

    @Override
    public int updateByPrimaryKeySelective(Payin record) {
        return payinMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Payin record) {
        return payinMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Payin> payInList() {
        return payinMapper.selectByExample(null);
    }

    @Override
    public boolean addPayIn(Payin payin) {
        return payinMapper.insertSelective(payin)>0?true:false;
    }



    @Override
    public int updatePayIn(Payin payin) {

        return payinMapper.updateByPrimaryKey(payin);
    }

    @Override
    public List<Payin> searchList(Map<String, String> params) {
        return payinMapper.searchPayIn(params);
    }

//    @Override
//    public List<Payin> searchList(String params) {


//     return payinMapper.searchPayIn(params);




}
